const path = require('path')

module.exports = {
  mode: 'development',
  entry: {
    main: path.resolve(__dirname, '../index.js')
  },
  output: {
    path: path.resolve(__dirname, '../dist'),
    filename: 'bundle.js'
  },
  module: {
    rules: [
      {
        test: /\.(js|mjs|jsx|ts|tsx)$/,
        // include: paths.appSrc,
        exclude: '/node_modules/',
        loader: require.resolve('babel-loader')
        // options: {
        //   customize: require.resolve(
        //     'babel-preset-react-app/webpack-overrides'
        //   ),

        //   plugins: [
        //     [
        //       require.resolve('babel-plugin-named-asset-import'),
        //       {
        //         loaderMap: {
        //           svg: {
        //             ReactComponent: '@svgr/webpack?-svgo![path]'
        //           }
        //         }
        //       }
        //     ]
        //   ],
        // This is a feature of `babel-loader` for webpack (not Babel itself).
        // It enables caching results in ./node_modules/.cache/babel-loader/
        // directory for faster rebuilds.
        // cacheDirectory: true,
        // cacheCompression: isEnvProduction,
        // compact: isEnvProduction
      }
    ]
  }
}
